<template>
  <div>
    <div class="dialogBody">
      <el-form label-width="100px" size="mini">
        <el-row style="margin-bottom: 10px;padding-left: 16px;">
          <el-col :span="12">
            <el-form-item label-width="120px" label="物料申请编号:">
              <p style="line-height: 0px;">{{ materialObj.bomApplyId }}</p>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label-width="120px" label="申请人:">
              <p style="line-height: 0px;">{{ materialObj.bomApplyId }}</p>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label-width="120px" label="申请日期:">
              <p style="line-height: 0px;">{{ materialObj.bomApplyId }}</p>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label-width="120px" label="申请用途:">
              <p style="line-height: 0px;">XXXXXXXXXXXXXXXXXXXXXX</p>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-tabs type="border-card">
              <el-tab-pane label="诊所一">
                <el-table
                  :data="tableData"
                  style="width: 100%"
                >
                  <el-table-column
                    prop="date"
                    width="180"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="name"
                    width="180"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="address"
                  >
                  </el-table-column>
                </el-table>
              </el-tab-pane>
            </el-tabs>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </div>
</template>

<script>
import { detail } from '@/api/logisticsManage';
export default {
  props: {
    materialObj: [Object],
    materialBomList: [Array]
  },
  data() {
    return {
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
    };
  },
  computed: {},
  mounted() {
    this.getMaterialDetail(this.materialObj.id);
    console.log("传过来了--------物料对象和物料数组-----", this.materialObj, this.materialBomList);
  },
  methods: {
    // 获取详情
    getMaterialDetail(id) {
      if (id) {
        detail(id).then(res => {
          console.log('详情 ----------', res);
        });
      }
    }
  }
};
</script>
